<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1{
            padding: 0;
            outline: 3px solid #000;
        }
        .rule1{
            float: left;
            margin: 10px;
            padding: 10px0;
            background: #eee;
            width: 100px;
            text-align: center;
        }
        .box{
            background: red;
            padding: 0;
            width: 500px;
            height: 400px;
        }
        /* .div2{
            float: left;
            padding: 10px;
            border: 3px solid red;
        } */
    </style>
</head>
<body>
    <div class="div1">
        <img src="https://gimg3.baidu.com/search/src=http%3A%2F%2Fpics1.baidu.com%2Ffeed%2Fc995d143ad4bd113fafabbfab47b99054afb0525.jpeg%3Ftoken%3D63b4e221c55157bbf40509314bd7a3a5&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=f360,240&n=0&g=0n&q=75&fmt=auto?sec=1651078800&t=9ef6b0c96cb5c4b06dd1bd841717e9c4" alt="">
        
    </div>
    <div class="box">
        <!-- 行内元素 不能设置宽高 是由内容撑起来的， -->
        <span class="rule1">首页</span>
        <span class="rule1">发现</span>
        <span class="rule1">动态</span>
        <span class="rule1">我的</span>
    </div>
    <!-- <div class="div2">
        <img src="https://gimg3.baidu.com/search/src=http%3A%2F%2Fpics1.baidu.com%2Ffeed%2Fc995d143ad4bd113fafabbfab47b99054afb0525.jpeg%3Ftoken%3D63b4e221c55157bbf40509314bd7a3a5&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=f360,240&n=0&g=0n&q=75&fmt=auto?sec=1651078800&t=9ef6b0c96cb5c4b06dd1bd841717e9c4" alt="">
        
    </div> -->
</body>
</html>